Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] 동적 inflate를 위한 chip 관련 구현, BreadTypeList Dto 형태 수정 및 관련 뷰 수정 #227

Merged
merged 18 commits into from
Feb 18, 2024

Conversation

Dan2dani
Copy link
Member

@Dan2dani Dan2dani commented Feb 17, 2024

Related issue 🛠

Work Description ✏️

  • 공통으로 쓰이는 BreadTypeIdDto, NutrientTypeIdDto 분리
  • BreadType, NutrientType Dto 형태 수정에 따른 관련 Dto, Entity 형식 수정
  • BreadType, NutrientType Dto 매핑할 때, 관리를 용이하게 하기위해서, id형태로 떨어지는 값을 -> enum 형태로 매핑해서 사용했습니다.
    (관리 + 랜더링 시점에서 리스트를 만들어내는게 비효율적이라고 생각)
  • ChipFactory에서 다양한 디자인의 Chip을 만들 수 있도록 Chip Factory 수정 (관련해서 차후 논의 필요할 듯)
  • Chip inflate, ChipGroup addView를 위한 각종 확장함수 구현
  • Dto 수정에 따른 BreadTypeChips 랜더링 방식 수정(가시성 조절 -> chip 동적 추가 형태로)

Screenshot 📸

  • 건빵집 상세페이지

  • 리뷰 작성하기

나 이거 사진이 안올라감

Uncompleted Tasks 😅

  • 건빵집 리스트 Dto 수정 (-> 차후에, 페이지네이션으로 수정하면서 수정 예정)

To Reviewers 📢

차후에 논의

Copy link
Collaborator

@jihyunniiii jihyunniiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨숩니당 ~

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

따로 만들어서 관리하니까 확실히 코드가 깔끔해지는군요 짱짱쓰

Comment on lines +25 to +29
breadTypeList = data.breadTypeList.mapNotNull { breadType ->
BreadFilterType.values().find {
it.id == breadType.breadTypeId
}
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 훨씬 좋네용

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enum으로 바꾸는거 굳이죵 ~~

@@ -12,3 +15,17 @@ data class Bakery(
val bakeryPicture: String,
val breadType: BreadType,
)

// TODO: 차후 네이밍 수정
data class BakeryInformation(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 네이밍도 괜찮을 듯요? ㅋ.ㅋ

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그런가염? 뭐가 나을까요

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BakeryIdentity 추천해봅니당

@@ -75,7 +75,7 @@ class BakeryListFragment :
viewModel.bakeryListState.flowWithLifecycle(lifecycle).onEach {
when (it) {
is UiState.Success -> {
bakeryAdapter.setBakeryList(it.data.toMutableList())
// bakeryAdapter.setBakeryList(it.data.toMutableList())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기 왜 주석 처리 되어있나염?????

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기 페이징 전환할 대 하려구요 ㅋㅎ

// 생명 주기 상태가 최소 CREATED 일 때만 수집하도록 제한
viewModel.profileInfo.flowWithLifecycle(
viewLifecycleOwner.lifecycle,
Lifecycle.State.CREATED
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

와 핑글 때 멘토님 피드백이 이런 의미였군요 감솨합니다 ~


// TODO: dana 다른 방식이 있는지 고민, 매 바인딩마다 removeAllViews 해야하는가 ?
with(binding.cgBakeryBreadTypes) {
this.removeAllViews()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거 매 바인딩마다 안 하면 칩이 안 사라지는 문제가 발생하게 되나요? 재사용 때문엥?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

칩이 동적으로 바인딩되는거라서 원래 있던거에 추가로 생김요 ㅜㅜ

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

무슨 방법 없을까여 근데 이게 제일 깔끔한 거 같기도,,,

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이게 이미 있었다니 충격 ㄷ.ㄷ

Copy link
Member

@jooyyoo jooyyoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고했어얌🩵

@@ -12,3 +15,17 @@ data class Bakery(
val bakeryPicture: String,
val breadType: BreadType,
)

// TODO: 차후 네이밍 수정
data class BakeryInformation(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BakeryIdentity 추천해봅니당

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

마술사 같다...

@Dan2dani Dan2dani merged commit 0f3a1ac into develop Feb 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[mod] BreadType, NutrientType DTO 수정 및 로직 수정(마이페이지, 내가 쓴 리뷰, 저장 목록)
3 participants